//
//  ContentViewController.h
//  eBook
//
//  Created by zhy on 12-11-29.
//  Copyright (c) 2012年 zhan. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "NoteViewController.h"
#import "LabelViewController.h"
#import "AddNoteViewController.h"
#import "SharingViewController.h"
#import "SinaWeibo.h"
#import "SinaWeiboRequest.h"
#import "QandAViewController.h"
#import "NewNoteViewController.h"
#import "DownloadUploadViewController.h"
#import "CommentViewController.h"
#import "NewBookmarkViewController.h"

@protocol ContentViewControllerDelegeta <NSObject>
- (void) back:(int) chapter;
-(void) showCover;
@end

@interface ContentViewController : UIViewController<UIWebViewDelegate,UIScrollViewDelegate,UIGestureRecognizerDelegate,NoteViewControllerDelegate,LabelViewControllerDelegate,SinaWeiboDelegate, SinaWeiboRequestDelegate,UITextViewDelegate,UIAlertViewDelegate,UITableViewDelegate,UITableViewDataSource,NewNoteVCDelegate,DUVCDelegate,CommentVCDelegate,NewBookmarkDelegate>
{
    
    UIView *menuView;
    UIView *butttomView;
    UIView *NoteInputView;
    UIView *HideView;
    BOOL ismenuViewShow;
    
    int currentChapter;
    int currentFeature;
    int currentPage;//当前页，begin with 1 CurrentPageofFeature
    int AllPagesCount;
    int FeatureCount;
    
    
    float pageWidth;//页大小
    
    
    UIPopoverController *NotePopoverC;
    UIPopoverController *LabelPopoverC;
    
    
    AddNoteViewController *addNoteVC;
    SharingViewController *SharingVC;
    QandAViewController *QandAVC;
    
    UIMenuController *menuController;
    UIMenuItem *addNoteMenuItem;
    
    BOOL isQandAshow;
    
    NSString *webLink;
    
}

@property (weak, nonatomic) id<ContentViewControllerDelegeta> ContentVCDelegeta;

@property (strong,nonatomic) NSString *URLString;

@property (weak, nonatomic) IBOutlet UIWebView *webView;
@property (weak, nonatomic) IBOutlet UISlider *buttomSlider;
@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property (weak, nonatomic) IBOutlet UIToolbar *toolbar;
@property (weak, nonatomic) IBOutlet UIView *menuContainerView;
@property (weak, nonatomic) IBOutlet UIBarButtonItem *searchBarBtn;


- (IBAction)buttomSliderAction:(id)sender;
- (IBAction)backMenuAction:(id)sender;
- (IBAction)SharingAction:(id)sender;
- (IBAction)backCoverAction:(id)sender;
- (IBAction)QandAAction:(id)sender;
- (IBAction)backIndexAction:(id)sender;
- (IBAction)hideAndShowMenuAction:(id)sender;
- (IBAction)noteAction:(id)sender;
- (IBAction)bookmarkAction:(id)sender;
- (IBAction)upLoadAction:(id)sender;
- (IBAction)downloadAction:(id)sender;
- (IBAction)commentAction:(id)sender;
- (IBAction)shareAction:(id)sender;
- (IBAction)searchAction:(id)sender;
- (IBAction)settingAction:(id)sender;



-(void) setChapter:(int) chapter andFeature:(int) feature andPage:(int) page andAllPages:(int) allpagecount andFeatureCount:(int) featureCount;

@end
